﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage.Master" AutoEventWireup="true" CodeBehind="JT_OperManager.aspx.cs" Inherits="JTicket.UI.JT_OperManager" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <!--分页Script-->
    <script type="text/jscript">
        var pages = 1;
        var page = 0;
        function pageselectCallback(page_id, jq) {
            var keyWord = $("#KeyWord").attr("value");
            window.location.href = "JT_OperManager.aspx?KeyWord="
            + keyWord + "&page=" + page_id;
        }
        $(document).ready(function () {
            $("#pager").pagination(pages, {
                current_page: page,
                items_per_page: 1,
                first_text: "首页",
                prev_text: "上一页",
                next_text: "下一页",
                last_text: "尾页",
                ellipse_text: " ",
                callback: pageselectCallback
            });
        });
        //查询
        function IsSelect() {
            window.location.href = "JT_OperManager.aspx?KeyWord="
            + $("#KeyWord").attr("value") + "&page=0";
        }
        //删除
        function IsDels(Ids) {
            if (isdel()) {
                JTicket.UI.Service.JT_OperSvc.Delete(Ids,
                function Succes(Result) { alert(Result); window.location.reload(); },
                isAlertError);
            }
        }
        //密码重置
        function isRePwd(Ids) {
            if (isdel()) {
                JTicket.UI.Service.JT_OperSvc.isRePwd(Ids,
                function Succes() { window.location.reload(); },
                isAlertError);
            }
        }
        
    </script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
   <asp:ScriptManager ID="sm" runat="server">
        <Services>
            <asp:ServiceReference InlineScript="true" Path="~/Service/JT_OperSvc.asmx" />
        </Services>
    </asp:ScriptManager>


    <table align="center" border="0" cellpadding="4" cellspacing="1" class="toptable grid"
        width="100%">
        <tr>
            <td class="category t2" height="25" width="100px">
                用户管理
            </td>
            <td class="category" height="25">
                <input id="KeyWord" class="input" type="text" /><input type="button" id="BtnSelete"
                    value="查  询" onclick="IsSelect();" onmousemove="showBtnOver(this)" onmouseout="showBtnOut(this)"
                    class="submitMiniGreen" /><input type="button" id="BtnAdd" value="添  加" onclick="javascript:window.location.href ='JT_OperAdd.aspx?Flag=Add'"
                        onmousemove="showBtnOver(this)" onmouseout="showBtnOut(this)" class="submitMiniGreen" />
            </td>
        </tr>
    </table>
    <table cellpadding="1" cellspacing="1" id="TbInfo" class="TbInfo">
        <tr>
            <td class="B" style="width: 10%">
                用户账号
            </td>
            <td class="B" >
                用户姓名
            </td>
            <td class="B" style="width:  10%">
                用户等级
            </td>
            <td class="B" style="width:  10%">
                用户状态
            </td>
            <td class="B" style="width:  10%">
                用户条码
            </td>
            <td class="B" style="width:  10%">
                折扣
            </td>
            <td class="B" style="width:  10%">
                销售方式
            </td>
            <td class="B" style="width:  10%">
                所属剧院
            </td>
            <td class="B" style="width: 10%">
                操作
            </td>
        </tr>
        <%foreach (var Oper in _OperInfo)
          { %>
        <tr>
            <td class="td1">
                <%=Oper.OperCode%>
            </td>
            <td class="td1">
                <%=Oper.OperName%>
            </td>
            <td class="td1">
                <%=Leve(Oper.CurLevel.ToString())%>
            </td>
            <td class="td1">
                <%=Stats(Oper.CurStatus.ToString())%>
            </td>
             <td class="td1">
                <%=Oper.barcode%>
            </td>
             <td class="td1">
                <%=Oper.ZheKou%>
            </td>
            <td class="td1">
                <%=SaleType(Oper.SaleType)%>
            </td>
              <td class="td1">
                <%=Oper.ThName%>
            </td>
            <td class="td2">
                <img src="Images/icon_edit.gif" alt="编辑" style="cursor:hand" onclick="isEdite('JT_OperAdd.aspx?Flag=Edite&ID=<%=Oper.OperCode%>')" />&nbsp;&nbsp;
                <img src="Images/no.gif" alt="删除" style="cursor: hand"  onclick="javascript:IsDels('<%=Oper.OperCode

%>');" />&nbsp;&nbsp;<img src="Images/qian_edit.gif" alt="密码重置" style="cursor:hand" onclick="isRePwd('<%=Oper.OperCode%>')" />
            </td>
        </tr>
        <%}%>
    </table>
    <div id="pager" class="pagination" style="background: #FFFFFF">
    </div>
</asp:Content>
